#include<bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin>>n;
    vector<int> arr(n);
    for(int i = 0;i < n;i++){
        cin>>arr[i];
    }

    int sz = arr.size();
    int cnt = 0;
    for(int i = sz-1;i >= 0;i--){
        int tmp = arr[i];
        for(int j = i;j >=0;j--){
            if(tmp > arr[j])cnt++;
        }
        arr[i] = cnt;
        cnt = 0;
    }

    for(auto e: arr){
        cout<<e<<" ";
    }

    return 0;
}